<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="imlgw,半岛铁盒,blog,Java博客,程序员,个人博客,java開發,程序員,個人博客,Java">
    <meta name="description" content="大悲无泪，大悟无言，大笑无声。">
    <meta name="author" content="Resolmi">
    
    <title>
        
            双向循环链表 |
        
        Tadow
    </title>
    
<link rel="stylesheet" href="/css/style.css">

    <link rel="shortcut icon" href="https://static.imlgw.top/blog/20210731/BtJz541CcmJU.ico">
    <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/css/font-awesome.min.css">
    <script id="hexo-configurations">
    let KEEP = window.KEEP || {};
    KEEP.hexo_config = {"hostname":"imlgw.top","root":"/","language":"zh-CN","path":"search.json"};
    KEEP.theme_config = {"toc":{"enable":true,"number":true,"expand_all":true,"init_open":true},"style":{"primary_color":"#0066CC","avatar":"https://static.imlgw.top/blog/20210731/3C7hCSRR3lfq.png","favicon":"https://static.imlgw.top/blog/20210731/BtJz541CcmJU.ico","article_img_align":"left","left_side_width":"260px","content_max_width":"920px","hover":{"shadow":false,"scale":true},"first_screen":{"enable":true,"background_img":"/images/image.svg","description":"Keep It Simple & Stupid."},"scroll":{"progress_bar":{"enable":true},"percent":{"enable":true}}},"local_search":{"enable":true,"preload":false},"code_copy":{"enable":true,"style":"default"},"pjax":{"enable":true},"lazyload":{"enable":true},"version":"3.4.3"};
    KEEP.language_ago = {"second":"%s 秒前","minute":"%s 分钟前","hour":"%s 小时前","day":"%s 天前","week":"%s 周前","month":"%s 月前","year":"%s 年前"};
  </script>
<meta name="generator" content="Hexo 5.4.0"><link rel="stylesheet" href="/css/prism.css" type="text/css"></head>


<body>
<div class="progress-bar-container">
    
        <span class="scroll-progress-bar"></span>
    

    
        <span class="pjax-progress-bar"></span>
        <span class="pjax-progress-icon">
            <i class="fas fa-circle-notch fa-spin"></i>
        </span>
    
</div>


<main class="page-container">

    

    <div class="page-main-content">

        <div class="page-main-content-top">
            <header class="header-wrapper">

    <div class="header-content">
        <div class="left">
            
            <a class="logo-title" href="/">
                Tadow
            </a>
        </div>

        <div class="right">
            <div class="pc">
                <ul class="menu-list">
                    
                        <li class="menu-item">
                            <a class=""
                               href="/"
                            >
                                首页
                            </a>
                        </li>
                    
                        <li class="menu-item">
                            <a class=""
                               href="/archives"
                            >
                                归档
                            </a>
                        </li>
                    
                        <li class="menu-item">
                            <a class=""
                               href="/categories"
                            >
                                分类
                            </a>
                        </li>
                    
                        <li class="menu-item">
                            <a class=""
                               href="/sbe"
                            >
                                订阅
                            </a>
                        </li>
                    
                        <li class="menu-item">
                            <a class=""
                               href="/links"
                            >
                                友链
                            </a>
                        </li>
                    
                        <li class="menu-item">
                            <a class=""
                               href="/about"
                            >
                                关于
                            </a>
                        </li>
                    
                    
                        <li class="menu-item search search-popup-trigger">
                            <i class="fas fa-search"></i>
                        </li>
                    
                </ul>
            </div>
            <div class="mobile">
                
                    <div class="icon-item search search-popup-trigger"><i class="fas fa-search"></i></div>
                
                <div class="icon-item menu-bar">
                    <div class="menu-bar-middle"></div>
                </div>
            </div>
        </div>
    </div>

    <div class="header-drawer">
        <ul class="drawer-menu-list">
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/">首页</a>
                </li>
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/archives">归档</a>
                </li>
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/categories">分类</a>
                </li>
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/sbe">订阅</a>
                </li>
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/links">友链</a>
                </li>
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/about">关于</a>
                </li>
            
        </ul>
    </div>

    <div class="window-mask"></div>

</header>


        </div>

        <div class="page-main-content-middle">

            <div class="main-content">

                
                    <div class="fade-in-down-animation">
    <div class="article-content-container">

        <div class="article-title">
            <span class="title-hover-animation">双向循环链表</span>
        </div>

        
            <div class="article-header">
                <div class="avatar">
                    <img src="https://static.imlgw.top/blog/20210731/3C7hCSRR3lfq.png">
                </div>
                <div class="info">
                    <div class="author">
                        <span class="name">Resolmi</span>
                        
                            <span class="author-label">BOSS</span>
                        
                    </div>
                    <div class="meta-info">
                        <div class="article-meta-info">
    <span class="article-date article-meta-item">
        <i class="fas fa-edit"></i>&nbsp;2018-08-18 00:00:00
    </span>
    
        <span class="article-categories article-meta-item">
            <i class="fas fa-folder"></i>&nbsp;
            <ul>
                
                    <li>
                        <a href="/categories/%E7%AE%97%E6%B3%95/">算法</a>&nbsp;
                    </li>
                
            </ul>
        </span>
    
    
        <span class="article-tags article-meta-item">
            <i class="fas fa-tags"></i>&nbsp;
            <ul>
                
                    <li>
                        <a href="/tags/%E7%AE%97%E6%B3%95/">算法</a>&nbsp;
                    </li>
                
                    <li>
                        | <a href="/tags/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">数据结构</a>&nbsp;
                    </li>
                
            </ul>
        </span>
    

    
    
        <span class="article-wordcount article-meta-item">
            <i class="fas fa-file-word"></i>&nbsp;<span>1.1k 字</span>
        </span>
    
    
        <span class="article-min2read article-meta-item">
            <i class="fas fa-clock"></i>&nbsp;<span>5 分钟</span>
        </span>
    
    
        <span class="article-pv article-meta-item">
            <i class="fas fa-eye"></i>&nbsp;<span id="busuanzi_value_page_pv"></span>
        </span>
    
</div>

                    </div>
                </div>
            </div>
        

        <div class="article-content markdown-body">
            <h2 id="C实现的双向循环链表"><a href="#C实现的双向循环链表" class="headerlink" title="C实现的双向循环链表"></a>C实现的双向循环链表</h2><p>很久没有用C了，都忘了，昨天下午又复习了一下然后实现了这个双向循环链表，后面每种数据结构都会在这里实现记录下来。<br>开发环境   : sublime+MinGW </p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line">#include &lt;stdio.h&gt;</span><br><span class="line">#include &lt;stdlib.h&gt;</span><br><span class="line"><span class="comment">//定义结构体</span></span><br><span class="line">typedef struct Node</span><br><span class="line">&#123;</span><br><span class="line">	<span class="keyword">int</span> data;</span><br><span class="line">	struct Node *perv;</span><br><span class="line">	struct Node *next;</span><br><span class="line">&#125;Node;</span><br><span class="line"></span><br><span class="line"><span class="keyword">int</span> length;</span><br><span class="line"></span><br><span class="line"><span class="comment">//初始化节点</span></span><br><span class="line">Node* createNode()&#123;</span><br><span class="line">	Node * node;</span><br><span class="line">	<span class="comment">//开辟空间</span></span><br><span class="line">	node =(Node*)malloc(sizeof(Node));</span><br><span class="line">	<span class="keyword">if</span>(node==NULL)&#123;</span><br><span class="line">		printf(<span class="string">&quot;动态开辟空间失败&quot;</span>);</span><br><span class="line">	&#125;</span><br><span class="line">	scanf(<span class="string">&quot;%d&quot;</span>,&amp;(node-&gt;data));</span><br><span class="line">	node-&gt;perv=NULL;</span><br><span class="line">	node-&gt;next=NULL;</span><br><span class="line">	<span class="keyword">return</span> node;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//初始化链表 </span></span><br><span class="line">Node* createList(<span class="keyword">int</span> n)</span><br><span class="line">&#123;</span><br><span class="line">    Node *tail,*p,*head;</span><br><span class="line">    <span class="comment">//初始化头结点 (这个节点只是个标志，标志链表的头并不存储数据,只是为了操作的统一性)</span></span><br><span class="line">    head=(Node*)malloc(sizeof(Node));</span><br><span class="line">    <span class="keyword">int</span> i;</span><br><span class="line">    <span class="keyword">if</span>(n &gt;= <span class="number">1</span>)   <span class="comment">//结点的个数 &gt;= 1 的时候</span></span><br><span class="line">    &#123;</span><br><span class="line">        p = createNode();</span><br><span class="line">        head-&gt;next = p;</span><br><span class="line">        p-&gt;perv=head;</span><br><span class="line">        tail = p;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">for</span>(i = <span class="number">2</span>;i &lt;= n;i++)    <span class="comment">//生成第一个结点以后的结点，并建立双向链表的关系 </span></span><br><span class="line">    &#123;</span><br><span class="line">        p = createNode();</span><br><span class="line">        tail-&gt;next = p;</span><br><span class="line">        p-&gt;perv = tail;</span><br><span class="line">        <span class="comment">//尾指针后移</span></span><br><span class="line">        tail = p;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">//连接头尾</span></span><br><span class="line">    head-&gt;perv=tail;</span><br><span class="line">    tail-&gt;next=head;</span><br><span class="line">    <span class="comment">//链表的长度</span></span><br><span class="line">    length = n;</span><br><span class="line">    <span class="keyword">if</span>(n &gt;= <span class="number">1</span>)</span><br><span class="line">        <span class="keyword">return</span> (head);</span><br><span class="line">    <span class="keyword">else</span></span><br><span class="line">        <span class="keyword">return</span> <span class="number">0</span>;    </span><br><span class="line">&#125; </span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">//在头尾插入节点   （实际上这两个方法都可以通过下面的insAnywhere完成，主要为了效率,如果是尾结点插入getEle()时间复杂度过高）</span></span><br><span class="line"><span class="comment">//insAnywhere(head,0);</span></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">insHead</span><span class="params">(Node* head)</span></span>&#123;</span><br><span class="line">	Node *p=createNode();</span><br><span class="line">	Node *q;</span><br><span class="line">	<span class="comment">//保存第一个节点</span></span><br><span class="line">	q=head-&gt;next;</span><br><span class="line">	<span class="comment">//连接头结点</span></span><br><span class="line">	head-&gt;next=p;</span><br><span class="line">	p-&gt;perv=head;</span><br><span class="line">	<span class="comment">//连接之前的第一个节点</span></span><br><span class="line">	p-&gt;next=q;</span><br><span class="line">	q-&gt;perv=p;</span><br><span class="line">	++length;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//insAnywhere(head,length);</span></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">insTail</span><span class="params">(Node* head)</span></span>&#123;</span><br><span class="line">	Node *p=createNode();</span><br><span class="line">	<span class="comment">//先保存下之前的尾指针</span></span><br><span class="line">	Node *tail=head-&gt;perv;</span><br><span class="line">	<span class="comment">//连接头尾</span></span><br><span class="line">	head-&gt;perv=p;</span><br><span class="line">	p-&gt;next=head;</span><br><span class="line">	<span class="comment">//连接之前的尾指针</span></span><br><span class="line">	tail-&gt;next=p;</span><br><span class="line">	p-&gt;perv=tail;</span><br><span class="line">	++length;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//取得某一位置的节点  时间复杂度为 O(n)</span></span><br><span class="line">Node * getEle(Node* head,<span class="keyword">int</span> n)&#123;</span><br><span class="line">	<span class="comment">//将第一个节点赋值给p</span></span><br><span class="line">	Node *p=head;</span><br><span class="line">	<span class="keyword">for</span> (<span class="keyword">int</span> i = <span class="number">0</span>; i &lt; n; ++i)</span><br><span class="line">	&#123;</span><br><span class="line">		p=p-&gt;next;</span><br><span class="line">	&#125;</span><br><span class="line">	<span class="keyword">return</span> p;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//获取链表的长度</span></span><br><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">getLength</span><span class="params">()</span></span>&#123;</span><br><span class="line">	<span class="keyword">return</span> length;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//任意位置插入，因为设置了头节点所以插入的操作具有一致性</span></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">insAnywhere</span><span class="params">(Node *head,<span class="keyword">int</span> n)</span></span>&#123;</span><br><span class="line">	Node *newNode=createNode();</span><br><span class="line">	<span class="comment">//取得对应位置的值</span></span><br><span class="line">	Node *currentNode=getEle(head,n);</span><br><span class="line">	<span class="comment">//保存当前位置的下一个</span></span><br><span class="line">	Node *nextNode;</span><br><span class="line">	<span class="comment">//保存下一个节点</span></span><br><span class="line">	nextNode=currentNode-&gt;next;</span><br><span class="line">	<span class="comment">//连接当前结点</span></span><br><span class="line">	currentNode-&gt;next=newNode;</span><br><span class="line">	newNode-&gt;perv=currentNode;</span><br><span class="line">	<span class="comment">//连接之前的下一个节点</span></span><br><span class="line">	newNode-&gt;next=nextNode;</span><br><span class="line">	nextNode-&gt;perv=newNode;</span><br><span class="line">	++length;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//任意位置的删除</span></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">delNode</span><span class="params">(Node *head,<span class="keyword">int</span> n)</span></span>&#123;</span><br><span class="line">	Node *delNode=getEle(head,n);</span><br><span class="line">	<span class="comment">/*printf(&quot;%d\n&quot;, delNode-&gt;data);</span></span><br><span class="line"><span class="comment">	printf(&quot;--------------\n&quot;);*/</span></span><br><span class="line">	<span class="comment">//先保存当前节点的后一节点</span></span><br><span class="line">	Node *nextNode=delNode-&gt;next;</span><br><span class="line">	<span class="comment">//将后一个节点接在当前节点的前一个的后面</span></span><br><span class="line">	delNode-&gt;perv-&gt;next=nextNode;</span><br><span class="line">	nextNode-&gt;perv=delNode-&gt;perv;</span><br><span class="line">	<span class="comment">//free这个节点</span></span><br><span class="line">	free(delNode);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">//遍历链表</span></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">printlnAll</span><span class="params">(Node *head)</span></span>&#123;</span><br><span class="line">	Node *p=head-&gt;next;</span><br><span class="line">   <span class="keyword">do</span>&#123;</span><br><span class="line">   	  printf(<span class="string">&quot;%d\n&quot;</span>, p-&gt;data);</span><br><span class="line">   	  p=p-&gt;next;</span><br><span class="line">   &#125;<span class="keyword">while</span>(p!=head);</span><br><span class="line">	<span class="comment">// while(p-&gt;next!=head)&#123;</span></span><br><span class="line">	<span class="comment">// 	printf(&quot;%d\n&quot;, p-&gt;data);</span></span><br><span class="line">	<span class="comment">// 	//指针后移</span></span><br><span class="line">	<span class="comment">// 	p=p-&gt;next;</span></span><br><span class="line">	<span class="comment">// &#125;</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span><span class="params">(<span class="keyword">int</span> argc, <span class="keyword">char</span> <span class="keyword">const</span> *argv[])</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line"></span><br><span class="line">	Node* createList(<span class="keyword">int</span> n);</span><br><span class="line">	Node* createNode();</span><br><span class="line"></span><br><span class="line">	Node *head=createList(<span class="number">3</span>);</span><br><span class="line">	printf(<span class="string">&quot;遍历链表\n&quot;</span>);</span><br><span class="line">	printlnAll(head);</span><br><span class="line">	</span><br><span class="line">	insHead(head);</span><br><span class="line">	<span class="comment">//insAnywhere(head,0);</span></span><br><span class="line">	printf(<span class="string">&quot;在头插入节点后\n&quot;</span>);</span><br><span class="line">	printlnAll(head);</span><br><span class="line"></span><br><span class="line">	insTail(head);    <span class="comment">//下面的也可以但是效率比较低</span></span><br><span class="line">	<span class="comment">//insAnywhere(head,getLength());</span></span><br><span class="line">	printf(<span class="string">&quot;在尾插入节点后\n&quot;</span>);</span><br><span class="line">	printlnAll(head);</span><br><span class="line"></span><br><span class="line">	<span class="comment">//在第一个元素后面插入元素</span></span><br><span class="line">	printf(<span class="string">&quot;---------在第一个元素后面插入元素-----\n&quot;</span>);</span><br><span class="line">	insAnywhere(head,<span class="number">1</span>);</span><br><span class="line">	printlnAll(head);</span><br><span class="line"></span><br><span class="line">	<span class="comment">//删除最后面的节点</span></span><br><span class="line">	printf(<span class="string">&quot;---------删除最后面的节点-------\n&quot;</span>);</span><br><span class="line">	delNode(head,<span class="number">6</span>);</span><br><span class="line">	printlnAll(head);</span><br><span class="line"></span><br><span class="line">	<span class="comment">//删除第一个后面的节点</span></span><br><span class="line">	printf(<span class="string">&quot;-------删除第一个后面的节点---------\n&quot;</span>);</span><br><span class="line">	delNode(head,<span class="number">2</span>);</span><br><span class="line">	<span class="comment">//printf(&quot;%d\n&quot;, head-&gt;next-&gt;data);</span></span><br><span class="line">	printlnAll(head);</span><br><span class="line">	<span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<ul>
<li>线性表<br><img  
                     lazyload
                     src="/images/loading.svg"
                     data-src="http://p0.cdn.img9.top/ipfs/QmUS62kkfTx4trGRmMukDCFuJNxrKDR2P2DdoERRqf1pcr?0.png"
                      alt="image"
                ><br>这里面的链式存储结构里面的 <em>静态链表</em> 挺有意思的，不用指针实现链式结构。<br>线性表的这两种结构实际上是后面其他数据结构的基础，顺序储存结构和链式储存结构也各有优劣。<br><img  
                     lazyload
                     src="/images/loading.svg"
                     data-src="http://p1.cdn.img9.top/ipfs/QmUWbnXLv86uwuCrWkp2ft6fax7TgZ1kryaCPKrWTGidsy?1.PNG"
                      alt="image"
                ></li>
</ul>
<p>注：代码中的String是我自定义的。</p>
<figure class="highlight java"><table><tr><td class="code"><pre><span class="line">typedef struct&#123;</span><br><span class="line">	<span class="comment">//长度</span></span><br><span class="line">	<span class="keyword">int</span> length;</span><br><span class="line">	<span class="comment">//内容</span></span><br><span class="line">	<span class="keyword">char</span> *str;</span><br><span class="line">	<span class="comment">//最大值</span></span><br><span class="line">	<span class="keyword">int</span> maxLength;</span><br><span class="line">&#125;String;</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">init</span><span class="params">(String *s,<span class="keyword">int</span> max,<span class="keyword">char</span> * string)</span></span>&#123;</span><br><span class="line">	<span class="keyword">int</span> i;</span><br><span class="line">	s-&gt;maxLength=max;</span><br><span class="line">	s-&gt;length=strlen(string);</span><br><span class="line">	<span class="comment">//开辟空间</span></span><br><span class="line">	s-&gt;str=(<span class="keyword">char</span>*)malloc(sizeof(<span class="keyword">char</span>)*max);</span><br><span class="line">	<span class="comment">//赋值</span></span><br><span class="line">	<span class="keyword">for</span>(i=<span class="number">0</span>;i&lt;s-&gt;length;i++)&#123;</span><br><span class="line">		s-&gt;str[i]=string[i];</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>


        </div>

        
            <div class="post-copyright-info">
                <div class="article-copyright-info-container">
    <ul>
        <li>本文标题：双向循环链表</li>
        <li>本文作者：Resolmi</li>
        <li>创建时间：2018-08-18 00:00:00</li>
        <li>
            本文链接：https://imlgw.top/2018/08/18/680ae0e/
        </li>
        <li>
            版权声明：本博客所有文章除特别声明外，均采用 <a class="license" target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">BY-NC-SA</a> 许可协议。转载请注明出处！
        </li>
    </ul>
</div>

            </div>
        

        
            <div class="article-nav">
                
                    <div class="article-prev">
                        <a class="prev"
                           rel="prev"
                           href="/2018/09/06/4d30a252/"
                        >
                            <span class="left arrow-icon flex-center">
                              <i class="fas fa-chevron-left"></i>
                            </span>
                            <span class="title flex-center">
                                <span class="post-nav-title-item">KMP算法及优化</span>
                                <span class="post-nav-item">上一篇</span>
                            </span>
                        </a>
                    </div>
                
                
                    <div class="article-next">
                        <a class="next"
                           rel="next"
                           href="/2018/07/01/bbbb4402/"
                        >
                            <span class="title flex-center">
                                <span class="post-nav-title-item">Hexo添加其他的评论系统</span>
                                <span class="post-nav-item">下一篇</span>
                            </span>
                            <span class="right arrow-icon flex-center">
                              <i class="fas fa-chevron-right"></i>
                            </span>
                        </a>
                    </div>
                
            </div>
        

        
            <div class="comment-container">
                <div class="comments-container">
    <div id="comment-anchor"></div>
    <div class="comment-area-title">
        <i class="fas fa-comments">&nbsp;评论</i>
    </div>
    

        
            <section class="disqus-comments">
<div id="disqus_thread">
  <noscript>Please enable JavaScript to view the <a target="_blank" rel="noopener" href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</section>

<script>
var disqus_shortname = 'imlgw';

var disqus_url = 'https://imlgw.top/2018/08/18/680ae0e/';

(function(){
  var dsq = document.createElement('script');
  dsq.type = 'text/javascript';
  dsq.async = true;
  dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>

<script id="dsq-count-scr" src="//imlgw.disqus.com/count.js" async></script>
        
    
</div>

            </div>
        
    </div>
</div>


                
            </div>

        </div>

        <div class="page-main-content-bottom">
            <footer class="footer">
    <div class="info-container">
        <div class="copyright-info info-item">
            &copy;
            
              <span>2018</span>&nbsp;-&nbsp;
            
            2021&nbsp;<i class="fas fa-heart icon-animate"></i>&nbsp;<a href="/">Resolmi</a>
        </div>
        
            <script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
            <div class="website-count info-item">
                
                    <span id="busuanzi_container_site_uv">
                        访问人数&nbsp;<span id="busuanzi_value_site_uv"></span>&ensp;
                    </span>
                
                
                    <span id="busuanzi_container_site_pv">
                        总访问量&nbsp;<span id="busuanzi_value_site_pv"></span>
                    </span>
                
            </div>
        
        
            <div class="icp-info info-item"><a target="_blank" rel="nofollow" href="https://beian.miit.gov.cn">鄂ICP备18011208号</a></div>
        
    </div>
</footer>

        </div>
    </div>

    
        <div class="post-tools">
            <div class="post-tools-container">
    <ul class="tools-list">
        <!-- TOC aside toggle -->
        
            <li class="tools-item page-aside-toggle">
                <i class="fas fa-outdent"></i>
            </li>
        

        <!-- go comment -->
        
            <li class="go-comment">
                <i class="fas fa-comment"></i>
            </li>
        
    </ul>
</div>

        </div>
    

    <div class="right-bottom-side-tools">
        <div class="side-tools-container">
    <ul class="side-tools-list">
        <li class="tools-item tool-font-adjust-plus flex-center">
            <i class="fas fa-search-plus"></i>
        </li>

        <li class="tools-item tool-font-adjust-minus flex-center">
            <i class="fas fa-search-minus"></i>
        </li>

        <li class="tools-item tool-expand-width flex-center">
            <i class="fas fa-arrows-alt-h"></i>
        </li>

        <li class="tools-item tool-dark-light-toggle flex-center">
            <i class="fas fa-moon"></i>
        </li>

        <!-- rss -->
        

        

        <li class="tools-item tool-scroll-to-bottom flex-center">
            <i class="fas fa-arrow-down"></i>
        </li>
    </ul>

    <ul class="exposed-tools-list">
        <li class="tools-item tool-toggle-show flex-center">
            <i class="fas fa-cog fa-spin"></i>
        </li>
        
            <li class="tools-item tool-scroll-to-top flex-center">
                <i class="arrow-up fas fa-arrow-up"></i>
                <span class="percent"></span>
            </li>
        
    </ul>
</div>

    </div>

    
        <aside class="page-aside">
            <div class="post-toc-wrap">
    <div class="post-toc">
        <ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#C%E5%AE%9E%E7%8E%B0%E7%9A%84%E5%8F%8C%E5%90%91%E5%BE%AA%E7%8E%AF%E9%93%BE%E8%A1%A8"><span class="nav-number">1.</span> <span class="nav-text">C实现的双向循环链表</span></a></li></ol>
    </div>
</div>
        </aside>
    

    <div class="image-viewer-container">
    <img src="">
</div>


    
        <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
          <span class="search-input-field-pre">
            <i class="fas fa-keyboard"></i>
          </span>
            <div class="search-input-container">
                <input autocomplete="off"
                       autocorrect="off"
                       autocapitalize="off"
                       placeholder="搜索..."
                       spellcheck="false"
                       type="search"
                       class="search-input"
                >
            </div>
            <span class="popup-btn-close">
                <i class="fas fa-times"></i>
            </span>
        </div>
        <div id="search-result">
            <div id="no-result">
                <i class="fas fa-spinner fa-pulse fa-5x fa-fw"></i>
            </div>
        </div>
    </div>
</div>

    

</main>



<script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/utils.js"></script><script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/main.js"></script><script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/header-shrink.js"></script><script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/back2top.js"></script><script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/dark-light-toggle.js"></script>


    <script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/local-search.js"></script>



    <script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/code-copy.js"></script>



    <script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/lazyload.js"></script>


<div class="post-scripts pjax">
    
        <script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/left-side-toggle.js"></script><script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/libs/anime.min.js"></script><script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/toc.js"></script>
    
</div>


    <script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/libs/pjax.min.js"></script>
<script>
    window.addEventListener('DOMContentLoaded', () => {
        window.pjax = new Pjax({
            selectors: [
                'head title',
                '.page-container',
                '.pjax'
            ],
            history: true,
            debug: false,
            cacheBust: false,
            timeout: 0,
            analytics: false,
            currentUrlFullReload: false,
            scrollRestoration: false,
            // scrollTo: true,
        });

        document.addEventListener('pjax:send', () => {
            KEEP.utils.pjaxProgressBarStart();
        });

        document.addEventListener('pjax:complete', () => {
            KEEP.utils.pjaxProgressBarEnd();
            window.pjax.executeScripts(document.querySelectorAll('script[data-pjax], .pjax script'));
            KEEP.refresh();
        });
    });
</script>



<script src="https://cdn.jsdelivr.net/npm/live2d-widget@3.x/lib/L2Dwidget.min.js"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"jsonPath":"https://cdn.jsdelivr.net/npm/live2d-widget-model-hijiki@1.0.5/assets/hijiki.model.json"},"display":{"superSample":2,"width":160,"height":320,"position":"right","hOffset":0,"vOffset":-70},"mobile":{"show":false,"scale":0.2},"log":false});</script></body>
</html>
